<?php $form=$this->beginWidget('CActiveForm', array(
    'id'=>'site-_form-form',
    'enableAjaxValidation'=>true,
    'enableClientValidation'=>true,
    'clientOptions'=>array(  
        'validateOnSubmit'=>true,  
     ),
)); ?>

<table class="table table-bordered table-hover definewidth m10">
    <tbody>
    	<tr>
            <td width="10%" class="tableleft">
                <?php echo $form->labelEx($model,'name'); ?>
            </td>
            <td>
                <?php echo $form->textField($model,'name',array('class'=>'txt pull-left')); ?>
                <?php echo $form->error($model,'name'); ?>
            </td>            
	    </tr>
   	    <tr>
            <td width="10%" class="tableleft">
                <?php echo $form->labelEx($model,'domain'); ?>
            </td>
            <td>
                <?php echo $form->textField($model,'domain',array('class'=>'txt pull-left')); ?>
                <?php echo $form->error($model,'domain'); ?> 
            </td>            
	    </tr>
   	    <tr>
            <td width="10%" class="tableleft">
                <?php echo $form->labelEx($model,'site_title'); ?>
            </td>
            <td>
                <?php echo $form->textField($model,'site_title',array('class'=>'txt pull-left')); ?>
                <?php echo $form->error($model,'site_title'); ?>
            </td>            
	    </tr>        
   	    <tr>
            <td width="10%" class="tableleft">
                <?php echo $form->labelEx($model,'keywords'); ?>
            </td>
            <td>
                <?php echo $form->textField($model,'keywords',array('class'=>'txt pull-left')); ?>
                <?php echo $form->error($model,'keywords'); ?>
            </td>            
	    </tr>        
   	    <tr>
            <td width="10%" class="tableleft">
                <?php echo $form->labelEx($model,'description'); ?>
            </td>
            <td>
                <?php echo $form->textArea($model,'description',array('class'=>'textarea pull-left')); ?>
                <?php echo $form->error($model,'description'); ?>
            </td>            
	    </tr>
        <tr>
            <td width="10%" class="tableleft">
                <?php echo $form->labelEx($model,'upload_maxsize'); ?>
            </td>
            <td>
                <?php $aJsonSetting = json_decode($model->setting ,true); ?>
                <input type="text" class="txt pull-left" name="Site[setting][upload_maxsize]" value="<?php echo isset($aJsonSetting['upload_maxsize']) ?  $aJsonSetting['upload_maxsize'] : '' ?>" />
                
                <?php echo $form->error($model,'setting[upload_maxsize]'); ?>
            </td>            
	    </tr>
        <tr>
            <td width="10%" class="tableleft">
                <?php echo $form->labelEx($model,'upload_type'); ?>
            </td>
            <td>
                <input type="text" class="txt pull-left" name="Site[setting][upload_type]" value="<?php echo isset($aJsonSetting['upload_type']) ?  $aJsonSetting['upload_type'] : '' ?>" />                
                <?php echo $form->error($model,'setting[upload_type]'); ?>
            </td>            
	    </tr>
        <tr>
            <td width="10%" class="tableleft">
                <?php echo $form->labelEx($model,'watermark'); ?>
            </td>
            <td>
                <?php 
                echo $form->radioButtonList($model,'watermark',Yii::app()->dict->get('global','watermark'),array('separator'=>'&nbsp;')); ?>
                <?php echo $form->error($model,'watermark'); ?>
            </td>            
	    </tr>
        <tr>
            <td width="10%" class="tableleft"></td>
            <td>
                <?php echo CHtml::submitButton('保存',array('class'=>'btn btn-primary'));?>
                <?php echo CHtml::link('返回列表',$this->createUrl('site/index'),array('class'=>'btn btn-success'));?>
            </td>            
        </tr>
   <tbody>
</table>
<?php $this->endWidget(); ?>
